package com.qingxin.wuye.entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;

/**
 * WyPropertyCompany entity. 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wy_property_company")
public class WyPropertyCompany extends com.qingxin.sys.entity.BaseEntity
		implements java.io.Serializable {
	private static final long serialVersionUID = -8132972502931036867L;
	// Fields

	private String companyid;
	private String companyName;
	private String corporatePerson;
	private String contactPerson;
	private String phone;
	private String address;
	private String businessNo;
	private String businessImg;
	private String remark;
	private String createBy;
	private Date createTime;
	private String updateBy;
	private Date updateTime;
	private Set<WyGarden> wyGardens = new HashSet<WyGarden>(0);

	// Constructors

	/** default constructor */
	public WyPropertyCompany() {
	}

	public WyPropertyCompany(String companyid, String companyName) {
		this.companyid = companyid;
		this.companyName = companyName;
	}


	/** full constructor */
	public WyPropertyCompany(String companyName, String corporatePerson,
			String contactPerson, String phone, String address,
			String businessNo, String businessImg, String remark,
			String createBy, Date createTime, String updateBy,
			Date updateTime, Set<WyGarden> wyGardens) {
		this.companyName = companyName;
		this.corporatePerson = corporatePerson;
		this.contactPerson = contactPerson;
		this.phone = phone;
		this.address = address;
		this.businessNo = businessNo;
		this.businessImg = businessImg;
		this.remark = remark;
		this.createBy = createBy;
		this.createTime = createTime;
		this.updateBy = updateBy;
		this.updateTime = updateTime;
		this.wyGardens = wyGardens;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "companyid", unique = true, nullable = false, length = 32)
	public String getCompanyid() {
		return this.companyid;
	}

	public void setCompanyid(String companyid) {
		this.companyid = companyid;
	}

	@Column(name = "company_name", length = 200)
	public String getCompanyName() {
		return this.companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	@Column(name = "corporate_person", length = 50)
	public String getCorporatePerson() {
		return this.corporatePerson;
	}

	public void setCorporatePerson(String corporatePerson) {
		this.corporatePerson = corporatePerson;
	}

	@Column(name = "contact_person", length = 50)
	public String getContactPerson() {
		return this.contactPerson;
	}

	public void setContactPerson(String contactPerson) {
		this.contactPerson = contactPerson;
	}

	@Column(name = "phone", length = 50)
	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "address", length = 500)
	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Column(name = "business_no", length = 50)
	public String getBusinessNo() {
		return this.businessNo;
	}

	public void setBusinessNo(String businessNo) {
		this.businessNo = businessNo;
	}

	@Column(name = "business_img", length = 100)
	public String getBusinessImg() {
		return this.businessImg;
	}

	public void setBusinessImg(String businessImg) {
		this.businessImg = businessImg;
	}

	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "create_by", length = 50)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_by", length = 50)
	public String getUpdateBy() {
		return this.updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Column(name = "update_time", length = 23)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "wyPropertyCompany")
	@JsonIgnore
	public Set<WyGarden> getWyGardens() {
		return this.wyGardens;
	}

	public void setWyGardens(Set<WyGarden> wyGardens) {
		this.wyGardens = wyGardens;
	}

}